﻿using System;

namespace XTengine.ComponentModel
{
    public class CharConverter : TypeConverter<Char>
    {
        public override Char ConvertFrom(string value)
        {
            if (string.IsNullOrEmpty(value))
                return '\0';

            return value[0];
        }

        public override string ConvertTo(Char value)
        {
            return value.ToString();
        }
    }
}